                    precision mediump int;
                    precision mediump float;
                    uniform sampler2D u_Sampler;
                    uniform sampler2D u_Sampler_color;
                    varying vec2 v_TextCoord;

                    uniform float imageWidth;
                    uniform float imageHeight;
                    uniform float focal;
                    uniform int blurCircle;
                    uniform int ifWind;
                    uniform int ifBuffer;
                    vec4 blurLine(float diameter,sampler2D sampler,float width,float height,int blurc){
                        const float PI = 3.14159265;
                        const int maxBlur = 14;
                        float sita = 0.0;
                        float sigma = 0.0;
                        int center = 0;
                        if(diameter==0.0){
                          sigma = 0.1;
                          sita = pow(0.1, 2.0);
                          center = 0;
                        }else if(diameter<=0.5){
                          sigma = 0.1 + (diameter * 2.0 )/ 0.5;
                          sita = pow(sigma, 2.0);
                          center = 1;
                        }else if(diameter<=0.8){
                          sigma = 0.5 + 4.0 / 0.3 * (diameter - 0.5);
                          sita = pow(sigma, 2.0);
                          center = 2;
                        }else{
                          sigma = 1.0 + 9.0 / 0.2 * (diameter - 0.8);
                          sita = pow(sigma, 2.0);
                          center = blurc;
                        }
                        float radio = sqrt(0.5 / PI / sita);
                        float sum = 0.0;
                        vec4 sumVec4 = vec4(0.0);
                        for(int i = 0; i < maxBlur; i++) if(i < center * 2 + 1) {
                            for(int j = 0; j < maxBlur; j++) if(j < center * 2 + 1) {
                                float x = float(i - center);
                                float y = float(j - center);
                                float weight = 0.5 / PI / sita * exp(-(pow(x, 2.0) + pow(y, 2.0)) / sita / 2.0);
                                if(i == 0 || j == 0) {
                                  vec4 color = texture2D(sampler, v_TextCoord);
                                  sumVec4 += color * weight;
                                  sum += weight;
                                } else {
                                  sum += weight;
                                  vec4 v = texture2D(sampler, vec2(v_TextCoord.x + x / width, v_TextCoord.y + y / height));
                                  sumVec4 += v * weight;
                                }
                      
                              }
                          }
                          return vec4(sumVec4.r/sum, sumVec4.g/sum, sumVec4.b/sum, sumVec4.a/sum);
                      }

                    void main() {
                        if(blurCircle>1){
                            vec4 colorBlur = blurLine(float(focal), u_Sampler, imageWidth,imageHeight,int(blurCircle));
                            if(ifWind==1){  
                                gl_FragColor = texture2D(u_Sampler_color, vec2(sqrt(dot(colorBlur.r,colorBlur.g)), 0.5));             
                            }else{
                                if(colorBlur.a>0.0){
                                    if(ifBuffer==1){
                                        if(colorBlur.r>0.01){ //0-value
                                            gl_FragColor = texture2D(u_Sampler_color, vec2(colorBlur.r, 0.5));
                                        }else{
                                            gl_FragColor = vec4(1.0,1.0,1.0,0.25);
                                        } 
                                    }else{
                                        gl_FragColor = texture2D(u_Sampler_color, vec2(colorBlur.r, 0.5));
                                    }
                                }else{
                                    gl_FragColor = vec4(1.0,1.0,1.0,0.25);  
                                } 
                            }
                        }else{
                            vec4 v = texture2D(u_Sampler, v_TextCoord);
                            if(v.g > 0.0){ //over maxium 
                                gl_FragColor = texture2D(u_Sampler_color, vec2(1.0, 0.5));
                            }else{
                                if(v.a > 0.25){  //0.25-blur border
                                    gl_FragColor = texture2D(u_Sampler_color, vec2(v.r, 0.5));  
                                }else{ //NoData value
                                    gl_FragColor = vec4(1.0,1.0,1.0,0.25);  
                                }    
                            }
                        }
                    }